﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DormMS.Model.ViewModels
{
    public class SystemMenuModel
    {
        public int Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string text { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public bool heading { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string sref { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string icon { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string alert { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string label { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
        
        public List<SystemMenuModel> submenu { get; set; }
        
        public string translate
        {
            get { return text; }
        }

        /// <summary>
        /// 权限管理树状图(全部权限)
        /// </summary>
        public string parent
        {
            get { return ParentId == 0 ? "#" : ParentId.ToString(); }
        }
        
        public object state { get; set; }
    }
}
